1. Field of the Invention
The present invention relates to a monitoring method for gathering, via a programmable logic controller, information concerning the operating state of equipment, such as a robot, numerical control apparatus or the like, in an assembly line of a plant, and displaying messages indicating a fault, operating status or the like of said equipment on a display such as a CRT.
2. Description of the Related Art
FIG. 30 is a diagrammatic view of a system employing a conventional monitor apparatus. The system includes the monitor apparatus 1, a programmable controller 3 (hereinafter referred to as "PLC"), and a controlling LAN 2 which connects the monitor apparatus to the PLC. The PLC controls, for example, a robot or a numerical control apparatus 4. The PLC 3 has a device memory for storing information on the state of an input device (input equipment which detects the state of an object to be controlled), or the like, and controls the object to be controlled by executing a predetermined sequence program while referencing the contents of the device memory.
FIG. 31 is a block diagram showing the diagrammatic configuration of the conventional monitor apparatus 1 which monitors the status of a robot or a numerical control apparatus in an assembly line of a plant. The monitor apparatus 1 includes a CPU 5 which controls operation of the monitor apparatus, an auxiliary storage device 9 which stores a screen data file 11 (see FIG. 32), and a memory 8 which stores programs for operating the monitor apparatus and screen data read from the screen data file of the auxiliary storage device 9. The monitor apparatus 1 further includes a PLC interface 6 for facilitating communication between the PLC 3 and the monitor apparatus 1, a CRT 7, and a keyboard 10.
FIG. 32 shows an example of a screen data file 11, in which the data of screens 1 and 2 has been registered. The screen data consists of screen display data 100 and screen switching setting data 101. The screen display data 100 registered is the elements of each graphic used to display a display, such as that shown in FIG. 35.
For example, in the screen 1 display data 100 shown in FIG. 32, No. 2 indicates that characters "PRODUCTION GOAL" are displayed at coordinates (x, y) of the CRT 7. No. 3 indicates that the value of PLC device D0 is displayed at coordinates (x, y) of the CRT 7. No. 9 indicates that the result of processing the value of PLC device D1, according to a process setting, is displayed at coordinates (x, y) of the CRT 7. That is, No. 9 indicates that the value of PLC device D1 is divided by the value of D0 and the result of the division is multiplied by 100, as indicated by the process setting.
A predetermined number of PLCs 3 are connected to the controlling LAN 2 as shown in FIG. 30. A PLC device (D0, D1, or the like), described in one screen data, is not always, but may be, present in a PLC.
A process setting is represented by arithmetic expressions, such as, "*" (multiplication), "/" (division), "+" (addition) and "-" (subtraction). Numerical values and PLC devices are combined, for example, as follows:
Arithmetic expression and numerical value, such as *100, /100, +100, -100, etc;
Arithmetic expression and PLC device, such as *W0, /W0, +W0, -W0, etc; and
Arithmetic expression, numerical value and PLC device, such as/D0*100, etc.
By using a process setting, as described above, the value of an achievement ratio can be displayed on a monitor screen as shown, for example, in FIG. 35. The screen switching setting data that is registered indicates to which screen the current screen will be switched. In the screen switching setting data in FIG. 32, for example, the [F1] function key and "screen 2" have been registered, indicating that pressing the [F1] key of the keyboard switches screen 1 to screen 2.
FIG. 33 shows an example of PLC devices in the PLC 3. In a device D, there are 100 areas from 0 to 99, and the devices are represented D0 to D99. In one area, any of the numerical values 0 to 65535 can be entered. FIG. 33 shows that 500 is in D0 and 100 is in D1.
FIG. 34 is a block diagram showing the function of the monitor apparatus 1. An operator uses a screen setting function 1-1 to create a monitor screen, such as that shown in FIG. 35, on CRT 7 on an interactive basis, and to write data representing the screen to the screen data file 11, shown in FIG. 32. In an off-line section, the screen is created with the screen setting function 1-1. To change the screen, the screen data file can be read and corrected.
An initialization function 1-2, on the other hand, is used to read the screen data file 11, stored in the auxiliary storage device 9, and write it to the memory 8. The file is written to the memory 8 before the screen is displayed, since the speed of reading the file from the auxiliary storage device 9 is slow.
A display function 1-3 is employed to read a monitor setting registered in the memory 8 and display it on the CRT 7, or to read a PLC device value from the PLC interface 6 and display it on the CRT 7. For instance, if the value of PLC device D0 is 500, 500 is displayed on the CRT 7. Also, when a function key is pressed, function 1-3 checks the screen switching setting data in the memory 8 and displays the screen corresponding to that function key, if such a corresponding screen exists. The screen setting function 1-1, the initialization function 1-2 and the display function 1-3 are constituted by programs in the memory 8 and executed by the CPU 5.
FIG. 36 is an operation flowchart of a conventional off-line section. The following operation sequence generates screens 1 and 2.
At step S1-1, screen 1 is created. At step S1-2, the setting of screen switching data for switching from screen 1 to another screen is performed. At steps S1-3 and S1-4, respectively, screen 2 is created and the setting of screen switching data is performed as in screen 1. At step S1-5, the screens created and the data setting performed are stored into the auxiliary storage device 9 as a screen data file. Steps S1-1 to S1-5 are implemented by the screen setting function 1-1.
FIG. 37 is an operation flowchart of a conventional on-line section. The following operation sequence effects the displaying of a screen data file, such as that shown in FIG. 32, which is created in the off-line section as the screen shown in FIG. 35
At step S1-6, the screen data file 11 is read from the auxiliary storage device 9 and written to the memory 8. At step S1-7, screen 1 is displayed. At step S1-8, a device is read from the PLC 3 via the PLC interface 6.
At step S1-9, the device read from the PLC 3 is displayed. If process setting has been defined in the screen data, mathematical operations are performed on the value read from the PLC 3 per the process setting, and the result is displayed.
As discussed above, at step S1-7, screen 1 is displayed. The screen 1 is a static screen forming a background screen which does not depend on the contents of the device memory of the PLC, and in particular, the screen 1 represents a default static screen (a screen where no static screen is specified). At step S1-10, it is determined whether or not a corresponding key has been pressed.
At step S1-11, it is determined whether the value entered through the keyboard matches the screen switching setting data. Since the screen switching data for screen 1 represents [F1], for example, it is determined whether or not the key pressed is [F1]. At step S1-12, the static screen selected is displayed. It should be noted that step S1-6 is executed by the initialization function 1-2, and steps S1-7 to S1-12 are implemented by the display function 1-3.
A description will be given of a trend display in the conventional monitoring method.
FIG. 38 shows a trend screen 3 in a conventional monitor apparatus. The trend screen 3 displays the quantities of three different products machined on a time-of-day basis, with the horizontal axis indicating the time-of-day and the vertical axis indicating the quantity.
FIG. 39 shows the sequential displaying of the trend screens, indicating that the quantity of each product changes at intervals of 10 seconds.
FIG. 40 shows an example of a screen data file 11 used to display the trend screen 3. As shown in this figure, one trend has been registered. For instance, No. 5 in screen 3 display data indicates that a trend of width 400 and height 300 is displayed at coordinates x, y of the CRT 7, and that the number of points in the horizontal axis is 7 and three values of PLC devices D0, D1, D2 are displayed at intervals of 10 seconds.
FIG. 41 is a block diagram showing the operation of the monitor apparatus. A trend display function 1-2 is employed to read a trend setting registered in the memory 8, to read PLC device values from the PLC interface 6, and to display trends on the CRT 7. The trend display function is constituted by a program in the memory 8 and executed by the CPU 5.
FIG. 42 is an operation flowchart of a conventional on-line section. The following operation sequence effects the displaying of the screen data file as shown in FIG. 40, which was created in the off-line section as the screen shown in FIG. 38.
Step S1-6 is identical to step S1-6 in the conventional example discussed above, as shown in FIG. 37. At step S2-1, screen 3 is displayed. At step S2-2, the area of the CRT 7 displaying the trends is written to the memory 8, shown as step 1 in FIG. 43. At step S2-3, the area shifted by one point is written from the memory 8 to the CRT 7, shown as step 2 in FIG. 43.
At step S2-4, the values of devices D2, D3 and D4 are read from the PLC 3. At step S2-5, the values read are displayed on the CRT, shown as step 3 in FIG. 43. At step S2-6, the operation is repeated after 10 seconds have elapsed, resuming at step S2-2. Step S1-6 is executed by the initialization function 1-2, and steps S2-1 to S2-7 are executed by the trend display function 1-3.
Preparation of a log file in the conventional trend display will now be described.
FIG. 44 is a block diagram showing how PLC device values displayed on a trend screen are written to a log file 17 in the conventional monitor apparatus. A log function 1-3 writes to a log file 17 the PLC device values read from the PLC 3, and the time-of-day when the values were read. The log function 1-3 is constituted by a program in the memory 8 and implemented by the CPU 5.
FIG. 45 shows an example of a log file containing time-of-day data, and the values of PLC devices D2, D3 and D4. The log file, which is stored in the auxiliary storage device 9, is copied by an operator onto a floppy disk in a floppy disk device 18 (see FIG. 46), and is used to display and analyze past trends on the CRT of another monitor apparatus.
FIG. 46 is a block diagram of the monitor apparatus, which includes a floppy disk device 18.
FIG. 47 is an operation flowchart of a conventional on-line section. Steps S1-6 to S2-5 are identical to corresponding steps in the conventional example discussed above and shown in FIG. 42.
At step S3-1, PLC device values, read from the PLC 3, and data representing the time-of-day are written to the log file 17. Step S3-1 is executed by the log function 3-1. Step S2-6 is identical to step S2-6 in the FIG. 42.
A conventional method of separating the screen data file 11 into static image display data and animation display data, and registering the separated data into the memory 8, will now be described.
FIG. 48 shows an example of a screen data file 11. In this figure, the data of screens 1 and 4 has been registered. The definition of data in the screen data file is the same as in FIG. 32, and the file registered has each graphic element used to display screens as shown in FIG. 49. Also, the screen switching setting data registered for screen 1 indicates that switching to screen 4 can be performed by pressing the [F4] key, and the data for screen 4 indicates that switching to screen 1 can be performed by pressing the [F2] key.
FIG. 50 is a block diagram showing the operation of the monitor apparatus which uses the conventional method described above, which includes a screen setting function 1-1 identical to that shown in FIG. 34. The conventional initialization function 4-2 is different from the initialization function described with reference to FIG. 34, in that it reads the screen data file 11 stored in the auxiliary storage device 9, and registers to the memory 8 the data having the attribute of a PLC device setting as animation display data and the other data as static image display data, as shown in FIG. 51. Also, this initialization function 4-2 defines the setting of a display screen number 4-5 on screen 1 as an initial screen.
A display function 4-3 displays on the CRT 7 the static image display data registered in the memory 8 according to the screen number specified by the display screen number 4-5, or reads PLC device values from the PLC interface 6 and displays them on the CRT 7.
The display processing and processing of screen switching by pressing a corresponding function key are similar to the display function 1-3 in FIG. 34, but are different therefrom in that the screen data handled has a format shown in FIG. 51, which is registered in the memory 8 by the initialization function 4-2. A display screen number 4-5 is used to set the screen number displayed by the display function 4-3. As in FIG. 34, the initialization function 4-2 and the display function 4-3 are constituted by programs in the memory 8 and are implemented by the CPU 5.
FIG. 52 is an operation flowchart of a conventional on-line section. At step S4-6, the screen data file 11 is read, and depending on the attribute, data with the setting of PLC devices is registered as animation display data and data without that setting is registered as static image display data. At step S4-13, the display screen number 4-5 is set to 1 as an initial display screen.
At step S4-7, the static image of the screen number specified in the display screen number 4-5 is displayed from the static image display data registered in the memory 8. At step S4-8, the PLC device values of the animation display data specified in the display screen number 4-5 are read from the PLC 3 via the PLC interface 6. At step S4-9, the device values read from the PLC 3 are displayed.
Step S4-10 is identical to step S1-10 in FIG. 37, and step S4-11 is identical to step S1-11 in FIG. 37. At step S4-12, the switching destination screen number of the screen switching setting data is set to the display screen number 4-5. The screen number set is displayed on the CRT 7 at steps S4-7, S4-8 and S4-9.
In this conventional example, the format of registering the screen data file 11 to the memory 8 is divided into the static image display data and the animation display data, whereby the animation display data, which is kept animated by the operation of the on-line section, is collected in a block to carry out the retrieval and reading processing of data at higher speed than in the conventional processing performed as shown, for example, in FIG. 37.
A conventional method of transmitting data to and from the PLC will now be described.
FIG. 53 shows the data formats of a PLC device read request and a response to and from the PLC interface 6 in FIG. 31. Request data 5-1 is where the first device to be read (1 word) and the number of points to be read (1 byte) are set. In this setting example, one point is to be read from D0.
Response data 5-2 is where the values of the devices (1 word), set in the request data 5-1, are arranged in order, starting with the first device. In this example, the value of D0 returned is 10.
Time required for the PLC interface 6 to read devices from the PLC3 can be calculated by the following equation: EQU Read time=(communication overhead)+(number of points)*(processing time)
where the processing time depends on the performance of communication between the PLC interface 6 and the PLC 3. For example, if the performance is 9600 bps, processing time required for one device point (3 bytes of request data+2 bytes of response data=5 bytes) is as follows: EQU 5*8/9600.gtoreq.4.17ms. PA1 Device X ON PA1 Device X OFF PA1 Device Y ON PA1 Device Y OFF PA1 Screen display time=610 ms PA1 Read time of 10 PLC devices=500 ms PA1 Write time to log file=500 ms.
The communication overhead is a length of time from when the PLC 3 receives request data until when it processes that data (normally, this processing is executed once every time the PLC 3 runs the program once), and its maximum value is equal to the operating time of the program. For instance, when request data is sent to the PLC 3, which is executing a program of 10 ms operating time, a maximum of 10 ms communication overhead is generated.
FIG. 54 shows an example of screen data 14. This figure shows the data of screen 5 used to display a screen shown in FIG. 55. The definition of the data in the screen data is the same as in FIG. 32. In the example shown in this figure, the PLC device setting alternates with data having the attribute of characters in sequence create the screen data, that is, in the order of D100, D0, D5, D101 and D102.
FIG. 56 is a flowchart showing the details of PLC device reading processing operation at step S1-8 in FIG. 37. At step S5-1, it is determined whether or not the remaining display data of the screen number displayed exists. When the processing has been performed up to the end of the screen data, the operation proceeds to the next step S1-9 in FIG. 37.
At step S5-2, one section of display data (1 set of data of graphic elements) is read from the screen data of the screen number displayed. At step S5-3, the attribute of the display data read at step S5-2 is checked to determine whether the PLC device must be read. At step S5-4, the value of one device is read from the PLC 3 via the PLC interface 6 according to the PLC device setting of the display data read at step S5-2.
Next, a description will be given of a conventional method used for displaying comment information.
FIG. 57 shows a conventional system configuration where the PLC is used. In this figure, a PLC peripheral device 19 is employed to create the sequence of the PLC and monitor the sequence.
FIG. 58 is a block diagram showing a diagrammatic configuration of the PLC 3 and the PLC peripheral device 19. A CPU 20 performs the sequence, which is stored in a memory 21. The sequence is loaded from the PLC peripheral device 23 and entered into the memory via a PLC peripheral device interface 26. A PLC interface 22 is provided in the PLC 3 to communicate with the other PLC and monitor apparatus 1.
An I/O 24 controls a robot or numerical control apparatus 4. A CPU 25 creates a sequence and monitors the status of the PLC 3. A memory 27 contains functions used to create the sequence and monitor the status of the PLC 3. A floppy disk device 30 stores the sequences created. The sequence created is loaded to the PLC 3 and the status of the PLC 3 is monitored via a PLC peripheral device interface 26. Finally, the peripheral device includes a CRT 28 and a keyboard 29.
FIG. 59 shows an example of a PLC sequence. As shown, when a start switch X0 (input device 0) turns on, a start LED Y100 (output device 100) turns on. Then, when a robot fault X1 (input device 1) turns on, a robot fault LED Y101 (output device 101) turns on. Such a sequence is written using the CRT 28 and the keyboard 29 of the PLC peripheral device 19.
FIG. 60 shows an example of storing the sequence example, as shown in FIG. 59, as a PLC sequence file. The file consists of a sequence area and a comment area. In the comment area, comments are registered in correspondence with devices.
FIG. 61 is a block diagram showing the operation of the PLC 3 according to a conventional method. Function 6-1 indicates that the operator creates a sequence using the CRT 28 and the keyboard 29, and subsequently stores it to a PLC sequence file 31. A PLC sequence writing function 6-2 used to read the PLC sequence file 31 and write it to the PLC 3.
A PLC sequence monitoring function 6-3 reads PLC device values from the PLC peripheral device interface 26 and displays them on the CRT 28. For instance, the values of PLC devices X0, X1, Y100, Y101 are read and displayed on the CRT as described below.
An example of monitoring is shown in FIG. 62. This figure monitors that X0 is on, Y100 is on, X1 is off, and Y101 is off, in accordance with the following display characteristics.
FIG. 63 is a flowchart of operating the conventional PLC and monitoring the state of the PLC. At step S6-1, the operator uses the CRT 28 and the keyboard 29 to create a sequence. At step S6-2, the sequence created is written to the PLC sequence file 31 onto the floppy disk of the floppy disk device 30.
At step S6-3, the sequence is written to the PLC 3. At step S6-4, the PLC device values are read from the PLC peripheral device interface 26 and displayed on the CRT 28.
FIG. 64 shows an example of a screen 6 displayed in the monitor apparatus. In this figure, the state of X0 of the PLC 3 was read, and X0 was "on" to indicate a robot fault.
FIG. 65 shows an example of a screen data file for FIG. 64. No. 2 indicates that when PLC device X0 turns on, a robot fault is displayed at coordinates x, y.
The operations of off-line and on-line sections in FIGS. 64 and 65 are the same as in the examples described above. As shown, NO. 2 indicates display of a robot fault at coordinates x and y when XO of the PLC device is turned on.
The conventional systems described above have the following disadvantages.
Because the conventional systems include only a single CPU, when this CPU is operating to read a PLC device and display the data read from the PLC device on the CRT 7, the CPU cannot operate to monitor the status of the keys, that is, to check whether or not a particular key was pressed. Hence, when the CPU operates to read a large number of PLC devices and to display the information read from these PLC devices on the CRT 7, this operation requires a long period of time to be performed.
For example, the operation of reading 40 PLC devices and setting the data read from these devices can take 2 seconds, as illustrated by the following equations: ##EQU1##
Hence, if 40 PLC devices are being displayed and any key is pressed, there is no response for approximately 2 seconds, which results in poor operability. Because of this problem, the appropriate number of PLC devices that can be displayed on one screen is only about 20.
Furthermore, since processing is performed in series, that is, trend data is transferred from the CRT 7 to the memory 8, the data shifted by one point is written from the memory 8 to the CRT 7, and the PLC devices are read to update the displayed trend. Thus, it takes a long time to display trends.
For example, in the conventional system, it may take approximately 1.11 seconds to display the trends of 10 PLC devices. This is illustrated by the following equations: ##EQU2##
Hence, in the conventional system, displaying a trend takes 610 ms+500 ms=1.11 seconds. Therefore, the trends could not be displayed at intervals of less that 1.11.
In addition, since PLC device values are written to a long file and then displayed, it takes a long time to display trends. For instance, as illustrated by the following equations, it takes 1.61 seconds to display the trends of 10 PLC devices.
Hence, the trend display in this case takes EQU 610 ms+500 ms+500 ms=1.61 seconds
Therefore, the trends could not be displayed at intervals of less than 1.61 seconds.
Furthermore, when one screen is switched to another, static image data is displayed on the CRT, PLC devices required to display animation data is then read, and the animation data is subsequently displayed, whereby it take time until all graphic elements are displayed after screen switching.
For example, if a screen data file requires two seconds to display static image data, two seconds to read PLC devices, and one second to display animation data, a static image area is displayed two seconds after screen switching, and in two seconds, animation begins to be displayed. That is, a total of five seconds is required to display all graphic elements on the CRT.
In addition, when PLC devices are to be read, data in screen data requiring PLC devices to be read is retrieved, and the devices are read on a point-by-point basis, whereby communication overhead time is generated for every one point of the set PLC devices.
For example, when the PLC running the program of 10 ms operating time and the screen data 5 in FIG. 54 is to be monitored, assume that the average communication overhead time is 5 ms (10ms/2) and the performance of communication between the PLC interface 6 and the PLC 3 is 9600 bps. Hence, the read time of one device point is as follows: EQU 0.005+(5*8/9600).apprxeq.9.17ms.
Since five points of PLC devices have been set in the screen data 5, the read time of the PLC devices on one screen is as follows: EQU 9.17*5=45.9 ms.
Finally, when a sequence is created with the PLC peripheral device in the conventional system, comments such as a robot fault are created using the CRT and keyboard. Also, in the monitor apparatus, a robot fault, etc., are entered as monitoring data.
Since the comments and monitoring data have the same meanings but exist separately, the same data had to be entered twice, resulting in much time and labor, and a large number of input processes.